Skip to content

Conversation

@paradoxicalguy
Copy link
Contributor

@paradoxicalguy paradoxicalguy commented Dec 25, 2025

this adds the Ordering enum to minicore.rs.

consequently, this updates tests/assembly-llvm/rust-abi-arg-attr.rs to import minicore directly. previously, this test file contained traits like Copy Clone PointeeSized, which were giving a duplicate lang item error, so replace those by importing minicore completely.

@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2025

This PR modifies tests/auxiliary/minicore.rs.

cc @jieyouxu

@rustbot rustbot added A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2025

Mark-Simulacrum is not on the review rotation at the moment.
They may take a while to respond.

@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@workingjubilee workingjubilee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't actually remove any diverging definitions from tests?

View changes since this review


#[lang = "c_void"]
#[repr(u8)]
#[repr(C)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not how c_void is defined in core::ffi. Please revert this unrelated change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure!

#[lang = "Ordering"]
#[repr(i8)]
pub enum Ordering {
Less = 0xFFu8 as i8,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry?

You can just write -1, can't you?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was giving an error before, reverted it back

Comment on lines 308 to 310
#[rustc_nounwind]
#[rustc_intrinsic]
pub const fn three_way_compare<T: Copy>(lhs: T, rhs: T) -> Ordering;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you also adding this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/assembly-llvm/rust-abi-arg-attr.rs - uses Ordering and three_way_compare

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 26, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 26, 2025
@paradoxicalguy
Copy link
Contributor Author

fixed minicore issues, aligned ordering and usize behavior, ready for re-review
@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 26, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Dec 26, 2025
@rust-log-analyzer

This comment has been minimized.

@paradoxicalguy
Copy link
Contributor Author

@rustbot ready

@paradoxicalguy
Copy link
Contributor Author

@workingjubilee
i used 0xFFu8 as i8 instead of -1 because in #![no_core] context, the unary - operator requires the Neg lang item and an impl Neg for i8, which aren't currently in minicore.

adding impl Neg for i8 just to support this discriminant would introduce operator semantics (arithmetic, overflow handling, MIR lowering) which minicore intentionally avoids. the 0xFFu8 as i8 approach uses pure constant evaluation with no operator traits or lang items required

if you'd prefer -1 for readability, i can add the Neg implementation

@workingjubilee
Copy link
Member

don't quote the deep magic to me. I was there when it was written.

minicore is minimal for the sake of not reimplementing all of core, nothing more.

@workingjubilee workingjubilee self-assigned this Dec 26, 2025
@paradoxicalguy paradoxicalguy changed the title tests: add Ordering to minicore for no_core codegen tests adding Ordering enum to minicore.rs, importing minicore in test file Jan 9, 2026
@paradoxicalguy paradoxicalguy changed the title adding Ordering enum to minicore.rs, importing minicore in test file adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file Jan 9, 2026
@workingjubilee
Copy link
Member

@bors r+

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 9, 2026

📌 Commit 484ea76 has been approved by workingjubilee

It is now in the queue for this repository.

@paradoxicalguy
Copy link
Contributor Author

yay :-D

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
tgross35 added a commit to tgross35/rust that referenced this pull request Jan 9, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 10, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 10, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 11, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 11, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
rust-bors bot added a commit that referenced this pull request Jan 11, 2026
Rollup of 14 pull requests

Successful merges:

 - #148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`))
 - #150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file)
 - #150668 (Unix implementation for stdio set/take/replace)
 - #150743 (Reword the collect() docs)
 - #150776 (Fix the connect_error test on FreeBSD 15+)
 - #150781 (Use `rand` crate more idiomatically)
 - #150786 (mGCA: Support array expression as direct const arguments)
 - #150812 (Bump `diesel` to the most recent commit in `cargotest`)
 - #150862 (std: sys: fs: uefi: Implement File::flush)
 - #150873 (Reenable GCC CI download)
 - #150908 (llvm: Update `reliable_f16` configuration for LLVM22)
 - #150918 (std: sys: fs: uefi: Implement File::seek)
 - #150922 (Subscribe myself to attr parsing)
 - #150930 (Remove special case for `AllowedTargets::CrateLevel`)

r? @ghost
rust-bors bot added a commit that referenced this pull request Jan 11, 2026
Rollup of 14 pull requests

Successful merges:

 - #148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`))
 - #150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file)
 - #150668 (Unix implementation for stdio set/take/replace)
 - #150743 (Reword the collect() docs)
 - #150776 (Fix the connect_error test on FreeBSD 15+)
 - #150781 (Use `rand` crate more idiomatically)
 - #150812 (Bump `diesel` to the most recent commit in `cargotest`)
 - #150862 (std: sys: fs: uefi: Implement File::flush)
 - #150873 (Reenable GCC CI download)
 - #150908 (llvm: Update `reliable_f16` configuration for LLVM22)
 - #150918 (std: sys: fs: uefi: Implement File::seek)
 - #150922 (Subscribe myself to attr parsing)
 - #150930 (Remove special case for `AllowedTargets::CrateLevel`)
 - #150942 (Port `#[rustc_has_incoherent_inherent_impls]` to attribute parser)

Failed merges:

 - #150943 (Port `#[must_not_suspend]` to attribute parser)

r? @ghost
@rust-bors rust-bors bot merged commit f417f55 into rust-lang:main Jan 11, 2026
11 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 11, 2026
rust-timer added a commit that referenced this pull request Jan 11, 2026
Rollup merge of #150368 - minicore-ordering, r=workingjubilee

adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jan 12, 2026
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`))
 - rust-lang/rust#150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file)
 - rust-lang/rust#150668 (Unix implementation for stdio set/take/replace)
 - rust-lang/rust#150743 (Reword the collect() docs)
 - rust-lang/rust#150776 (Fix the connect_error test on FreeBSD 15+)
 - rust-lang/rust#150781 (Use `rand` crate more idiomatically)
 - rust-lang/rust#150812 (Bump `diesel` to the most recent commit in `cargotest`)
 - rust-lang/rust#150862 (std: sys: fs: uefi: Implement File::flush)
 - rust-lang/rust#150873 (Reenable GCC CI download)
 - rust-lang/rust#150908 (llvm: Update `reliable_f16` configuration for LLVM22)
 - rust-lang/rust#150918 (std: sys: fs: uefi: Implement File::seek)
 - rust-lang/rust#150922 (Subscribe myself to attr parsing)
 - rust-lang/rust#150930 (Remove special case for `AllowedTargets::CrateLevel`)
 - rust-lang/rust#150942 (Port `#[rustc_has_incoherent_inherent_impls]` to attribute parser)

Failed merges:

 - rust-lang/rust#150943 (Port `#[must_not_suspend]` to attribute parser)

r? @ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants